/*河南星辰软件科技有限公司
@copyright Copyright (c) 2010~2022 All rights reserved.
*/
package cn.javaxc.oa.action.process;
import java.io.*;
import java.util.*;
import java.sql.*;
import cn.javaxc.model.base.SQL;
import cn.javaxc.model.base.SQLList;
import cn.javaxc.model.base.SQLMap;
import cn.javaxc.model.base.SQLParam;
import cn.javaxc.model.page.BatisPage;
import cn.javaxc.mvcwork.controller.web.TreeBean;
import cn.javaxc.mvcwork.util.common.CommonUtil;
import cn.javaxc.mvcwork.util.common.MapListUtil;
import cn.javaxc.mvcwork.util.helper.FrameHelper;
import cn.javaxc.mvcwork.util.helper.TreeTableHelper;
import org.springframework.beans.factory.annotation.Autowired;
import cn.javaxc.system.action.base.BaseAction;
import cn.javaxc.oa.mapper.process.CounterSignMapper;
public class CounterSign extends BaseAction
{
    @Autowired(required=false)
	private CounterSignMapper mapper;
    /**
    修改请假业务
    */
    
    public Map edit() {
        
        Map result=new HashMap();
        SQLParam params=new SQLParam(request,result);
        
        
        
        SQLList<SQLMap> selectUserByLoginName=mapper.selectUserByLoginName(params);
        SQLMap selectUserByLoginName_emt=selectUserByLoginName.getExistfirst();
        result.put("selectUserByLoginName", selectUserByLoginName_emt);
        
        
        SQLList<SQLMap> selectBizLeaveById=mapper.selectBizLeaveById(params);
        SQLMap selectBizLeaveById_emt=selectBizLeaveById.getExistfirst();
        result.put("selectBizLeaveById", selectBizLeaveById_emt);
        
        return result;
    }
    /**
    申请列表
    */
    
    public Map leaveLoad() {
        
        Map result=new HashMap();
        SQLParam params=new SQLParam(request,result);
        
        SQLList<SQLMap> s_year=mapper.s_year(params);
        s_year.setSelectNone("年");
        result.put("s_year", s_year);
        
        
        SQLList<SQLMap> s_month=mapper.s_month(params);
        s_month.setSelectNone("月");
        result.put("s_month", s_month);
        
        
        params.def("CMIDSEL1",SQL.getYear());
        Object CMIDSEL1 =mapper.CMIDSEL1(params);
        result.put("CMIDSEL1", CMIDSEL1);
        
        
        params.def("CMIDSEL2",SQL.getMonth());
        Object CMIDSEL2 =mapper.CMIDSEL2(params);
        result.put("CMIDSEL2", CMIDSEL2);
        
        
        SQLList<SQLMap> s_search=mapper.s_search(params);
        SQLMap s_search_emt=s_search.getExistfirst();
        result.put("s_search", s_search_emt);
        
        
        SQLList<SQLMap> s_calendar=mapper.s_calendar(params);
        result.put("s_calendar", s_calendar);
        
        
        result.put("s_calendar", MapListUtil.split(s_calendar,7));
        
        
        
        return result;
    }
    /**
    */
    
    public Object list() {
        
        Map result=new HashMap();
        SQLParam params=new SQLParam(request,result);
        
        
        
        SQLList<SQLMap> BizLeaveList=mapper.BizLeaveList(params);
        result.put("BizLeaveList", BizLeaveList);
        
        return BizLeaveList;
    }
    /**
    */
    
    public Map addSave() {
        
        Map result=new HashMap();
        SQLParam params=new SQLParam(request,result);
        
        
        
        int insertBizLeave = mapper.insertBizLeave(params);
        result.put("insertBizLeave", insertBizLeave);
        
        return result;
    }
    /**
    */
    
    public Map editSave() {
        
        Map result=new HashMap();
        SQLParam params=new SQLParam(request,result);
        
        
        
        mapper.editSave(params);
        
        return result;
    }
    /**
    */
    
    public Map export() {
        
        Map result=new HashMap();
        SQLParam params=new SQLParam(request,result);
        
        
        
        SQLList<SQLMap> selectUserByLoginName=mapper.selectUserByLoginName(params);
        SQLMap selectUserByLoginName_emt=selectUserByLoginName.getExistfirst();
        result.put("selectUserByLoginName", selectUserByLoginName_emt);
        
        return result;
    }
    /**
    */
    
    public Map selectVerifyUser() {
        
        Map result=new HashMap();
        SQLParam params=new SQLParam(request,result);
        return result;
    }
    /**
    */
    
    public Map remove() {
        
        Map result=new HashMap();
        SQLParam params=new SQLParam(request,result);
        
        
        
        mapper.remove(params);
        
        return result;
    }
    /**
    */
    
    public Map submitApply() {
        
        Map result=new HashMap();
        SQLParam params=new SQLParam(request,result);
        
        
        
        SQLList<SQLMap> selectUserByLoginName=mapper.selectUserByLoginName(params);
        SQLMap selectUserByLoginName_emt=selectUserByLoginName.getExistfirst();
        result.put("selectUserByLoginName", selectUserByLoginName_emt);
        
        
        SQLList<SQLMap> selectBizLeaveById=mapper.selectBizLeaveById(params);
        SQLMap selectBizLeaveById_emt=selectBizLeaveById.getExistfirst();
        result.put("selectBizLeaveById", selectBizLeaveById_emt);
        
        
        
        
        mapper.submitApply(params);
        
        
        mapper.submitApply(params);
        
        return result;
    }
    /**
    */
    
    public Map showVerifyDialog() {
        
        Map result=new HashMap();
        SQLParam params=new SQLParam(request,result);
        
        
        
        SQLList<SQLMap> selectUserByLoginName=mapper.selectUserByLoginName(params);
        SQLMap selectUserByLoginName_emt=selectUserByLoginName.getExistfirst();
        result.put("selectUserByLoginName", selectUserByLoginName_emt);
        
        
        SQLList<SQLMap> selectBizLeaveById=mapper.selectBizLeaveById(params);
        SQLMap selectBizLeaveById_emt=selectBizLeaveById.getExistfirst();
        result.put("selectBizLeaveById", selectBizLeaveById_emt);
        
        return result;
    }
    /**
    */
    
    public Map taskDoneList() {
        
        Map result=new HashMap();
        SQLParam params=new SQLParam(request,result);
        
        
        
        SQLList<SQLMap> selectUserByLoginName=mapper.selectUserByLoginName(params);
        SQLMap selectUserByLoginName_emt=selectUserByLoginName.getExistfirst();
        result.put("selectUserByLoginName", selectUserByLoginName_emt);
        
        
        SQLList<SQLMap> selectBizLeaveById=mapper.selectBizLeaveById(params);
        SQLMap selectBizLeaveById_emt=selectBizLeaveById.getExistfirst();
        result.put("selectBizLeaveById", selectBizLeaveById_emt);
        
        return result;
    }
    /**
    */
    
    public Map taskList() {
        
        Map result=new HashMap();
        SQLParam params=new SQLParam(request,result);
        
        
        
        SQLList<SQLMap> selectUserByLoginName=mapper.selectUserByLoginName(params);
        SQLMap selectUserByLoginName_emt=selectUserByLoginName.getExistfirst();
        result.put("selectUserByLoginName", selectUserByLoginName_emt);
        
        
        SQLList<SQLMap> selectBizLeaveById=mapper.selectBizLeaveById(params);
        SQLMap selectBizLeaveById_emt=selectBizLeaveById.getExistfirst();
        result.put("selectBizLeaveById", selectBizLeaveById_emt);
        
        return result;
    }
    /**
    */
    
    public Map complete() {
        
        Map result=new HashMap();
        SQLParam params=new SQLParam(request,result);
        
        
        
        mapper.complete(params);
        
        return result;
    }
}